/*
 * Copyright 2020-2025 the original author or authors.
 * You cannot use this file unless authorized by the author.
 */

package org.ipig.commons.conf;

/**
 * 通用配置服务
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id: GenericConfService.java 3 2020-01-21 09:36:33Z ts <comchnts@163.com> $$
 * @since 1.0
 */
public interface GenericConfService<Conf extends ConfService> {

    /**
     * 获取 conf
     *
     * @return Conf
     */
    public Conf getConf();

    /**
     * 配置 conf
     *
     * @param conf Conf
     */
    public void setConf(Conf conf);

    /**
     * 初始化
     * <li>注：有返回值以便重写扩展
     *
     * @param conf Conf
     * @return Conf
     */
    public default Conf init(Conf conf) {
        return conf;
    }
}
